/**
 * @date     2018-12-10
 * @author   尹学江
 */
import Cookies from 'js-cookie'
/**
 * 存储Cookie
 */
export const setCookie = (...params) => {
  Cookies.set(...params)
}

/**
 * 获取Cookie
 */
export const getCookie = name => {
  return Cookies.get(name)
}

/**
 * 获取Cookie JSON对象
 */
export const getCookieJSON = name => {
  return Cookies.getJSON(name)
}

/**
 * 获取Cookies JSON对象
 */
export const getCookies = () => {
  return Cookies.getJSON()
}

/**
 * 删除Cookie
 */
export const removeCookie = name => {
  Cookies.remove(name)
}
